package com.java2207.group1.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @author AL 2022/7/26  8:10
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Purchase {

    private Integer id;

    //肉类
    private String meat;

    //蔬菜类
    private String vegetable;

    //水果类
    private String fruit;

    //粮油类
    private String cereal;

    //时间
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date time;

    //保质天数
    private String day;
}
